package org.bbelovic.devel.metro.wsdlfirst.client;

import org.bbelovic.devel.metro.wsdlfirst.service.MultiplyPortType;
import org.bbelovic.devel.metro.wsdlfirst.service.MultiplyService;



public class Client {

    public static void main(String[] args) throws Exception {

        if (args.length != 2) {
            printUsage();
            return;
        }
        
        MultiplyService service = new MultiplyService();
        MultiplyPortType port = service.getMultiplyPort();
        
        final int  num1 = Integer.valueOf(args[0]);
        final int  num2 = Integer.valueOf(args[1]);
        
        final int result = port.multiply(num1, num2);
        System.out.println("result=" + result);
    }

    private static void printUsage() {
        System.out.println("Invoke using Client <num1> <num2>");
    }
}
